import {get,post} from '../utils/request'
interface LoginData{
    admin_name:string
    pwd:string
}
const login = <LoginData>(data:LoginData):any=>{
    return post('visit/admin/login',data);
}
// 管理员列表
const getList = (params:any):any=>{
    return get('visit/admin/list',params);
}
// 删除管理员
const deladmin = (props:any):any=>{
    return get('visit/admin/del',props)
}
// 修改管理员 根据id查询单条记录
const getDetail = (id:number):any=>{
    return get('visit/admin/show',{id})
}
// 修改
const removeAdm = (params:any):any=>{
    return post('visit/admin/edit',params)
}
// 添加管理员
const getAdds= (params:any):any=>{
    return post('visit/admin/add',params);
}
export {login,getList,deladmin,getDetail,getAdds,removeAdm}